
public class NodeH2 {
	
	public String character;
	public int frequency;
	public String codeWord;
	
	private NodeH2 left;
	private NodeH2 right;
	private NodeH2 next;
	private NodeH2 previous;

	/**
	 * Construtor
	 * 
	 * @param string
	 * @param i
	 */
	public NodeH2(String string, int freq) {
		
		character = string;
		frequency = freq;
		codeWord = "";
		
		left = null;
		right = null;
		next = null;
		previous = null;
	}

	/**
	 * Metodo
	 * 
	 * @return
	 */
	public int getFrequency() {
		return frequency;
	}

	/**
	 * 
	 * @param frequency
	 */
	public void setFrequency(int frequency) {
		this.frequency = frequency;
	}

	/**
	 * Metodo
	 * 
	 * @return
	 */
	public NodeH2 getLeft() {
		return left;
	}
	
	/**
	 * Metodo
	 * 
	 * @param left
	 */
	public void setLeft(NodeH2 left) {
		this.left = left;
	}

	/**
	 * Metodo
	 * 
	 * @return
	 */
	public NodeH2 getRight() {
		return right;
	}

	/**
	 * Metodo
	 * 
	 * @param right
	 */
	public void setRight(NodeH2 right) {
		this.right = right;
	}

	/**
	 * Metodo
	 * 
	 * @return
	 */
	public NodeH2 getPrevious() {
		return previous;
	}

	/**
	 * Metodo
	 * 
	 * @param previous
	 */
	public void setPrevious(NodeH2 previous) {
		this.previous = previous;
	}

	/**
	 * Metodo
	 * 
	 * @return
	 */
	public NodeH2 getNext() {
		return next;
	}

	/**
	 * Metodo
	 * 
	 * @param next
	 */
	public void setNext(NodeH2 next) {
		this.next = next;
	}

}